﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Website/Views/Shared/Master.Master"
    Inherits="System.Web.Mvc.ViewPage<List<ELeaveWord>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <%--<div class="border2">
        <div class="htitle">
            <span>留言</span></div>
        <div class="htitle">
            <span>发表留言</span></div>&nbsp;
    </div>--%>
    <form id="leaveword" action="" method="post">
    <ul class="leaveword">
        <li>你的姓名：<%=Html.TextBox("name") %>
            联系方式：<%=Html.TextBox("contactWay", null, new { @class = "width300" })%></li>
        <li>
            <%=Html.TextArea("content", new { @class = "txtContent" })%></li>
        <li>
            <input type="submit" name="submit" id="submit" value="发表留言" /><span class="colorRed">留言需要审核，请不要重复提交</span></li>
    </ul>
    </form>
    <%
        foreach (ELeaveWord item in Model.Where(ii => ii.RId == 0))
        {
    %>
    <div class="leaveword">
        <div class="arcBox">
            <div class="arc1">
            </div>
            <div class="arc2">
            </div>
            <div class="arc5">
            </div>
        </div>
        <div class="arcMain">
            <div class="leavewordheader">
                <%=item.WriteTime.ToString("yyyy-MM-dd hh:mm:ss") + " " + item.Name%>
                留言</div>
            <div class="leavewordBody">
                <%=item.Content%></div>
            <% foreach (var innerItem in Model.Where(i => i.RId != 0 && i.LId == item.LId))
               {
            
            %>
            <div class="reply">
                <strong>回复：</strong><%=innerItem.Content%>
            </div>
            <%
                }
            %>
        </div>
        <div class="arcBox">
            <div class="arc3">
            </div>
            <div class="arc4">
            </div>
            <div class="arc5">
            </div>
        </div>
    </div>
    <%
        }
    %>
    <div class="divPager2" style="clear: both;">
        <%= Html.Pager(ViewData["Pager"])%>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
    <script src="<%=Url.Content("~/Scripts/Common/jquery.form.min.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
    <style type="text/css">
        .divPager2
        {
            text-align: center;
            clear: both;
            padding-top: 10px;
            padding-bottom: 4px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
    <script type="text/javascript">
        $(function () {
            $(':form').ajaxForm(function (msg) {
                eval(msg);
            });
        });
    </script>
</asp:Content>
